-
Notifications
You must be signed in to change notification settings - Fork 38
Update to tinkerbell/tinkerbell/api
for API definitions; Upgrade controller-runtime, CAPI, Go version, and all direct deps:
#468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tinkerbell/tinkerbell/api
for API definitions; Upgrade controller-runtime and capi:tinkerbell/tinkerbell/api
for API definitions; Upgrade controller-runtime, CAPI, Go version, and all direct deps:
Move to github.com/tinkerbell/tinkerbell/api: This is the new repo for all API definitions. Upgrade all go.mod dependencies: This uses the latest version of controller-runtime and capi. Fix kustomize files to remove deprecated fields: This gets Tilt and kustomize working properly. This was tested using the CAPT playground. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Move to a string instead of the deprecated capierrors.MachineStatusError. predicates.ClusterPausedTransitionsOrInfrastructureReady is the suggested function to use instead of the deprecated predicates.ClusterUnpausedAndInfrastructureReady. Signed-off-by: Jacob Weinstock <[email protected]>
The compatibility is being moved to each release. This is to help with keeping up the list. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Renaming to isoboot makes this mode name in line with netboot. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
This gets the project to the latest Tinkerbell, CAPI, and controller runtime versions. Signed-off-by: Jacob Weinstock <[email protected]>
The Tinkerbell CAPT playground has a command for performing the pivot process. This doc update details this process some. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
The only change is the annotation denoting the kubebuilder version. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
This gets the controller to work with the Helm charts <= 0.6.2 Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
This is needed for backward compatibility with Chart <= 0.6.2 Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
cb09131
to
ba68c6e
Compare
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the cluster-api-provider-tinkerbell to use the new centralized API definitions from github.com/tinkerbell/tinkerbell/api
and upgrades all dependencies including controller-runtime, CAPI, and Go version. It also fixes deprecated kustomize configurations to work with modern tooling.
- Move API imports from separate
tink
andrufio
repos to unifiedtinkerbell/api
- Upgrade Go from 1.23 to 1.24 and update all dependencies to latest versions
- Fix kustomize configurations by replacing deprecated fields with modern syntax
Reviewed Changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
main.go | Updated imports and scheme registration for new API structure |
go.mod | Upgraded Go version and all dependencies to latest versions |
controller/ | Updated all imports to use new unified API packages |
config/ | Modernized kustomize configurations replacing deprecated syntax |
api/v1beta1/ | Added new boot mode constants and updated webhook interfaces |
Makefile | Updated tool versions and Go version references |
@@ -143,22 +143,26 @@ func (scope *machineReconcileScope) reconcile(hw *tinkv1.Hardware) error { | |||
return fmt.Errorf("ensure template and workflow returned: %w", err) | |||
} | |||
|
|||
if wf.Status.State == tinkv1.WorkflowStateFailed || wf.Status.State == tinkv1.WorkflowStateTimeout { | |||
// STATE_* is needed for Helm charts <= 0.6.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This comment suggests temporary backward compatibility code. Consider adding a TODO or tracking issue to remove this compatibility code when support for older Helm charts is dropped.
// STATE_* is needed for Helm charts <= 0.6.2 | |
// TODO: Remove STATE_* compatibility when support for Helm charts <= 0.6.2 is dropped. See https://github.com/tinkerbell/cluster-api-provider-tinkerbell/issues/XXX |
Copilot uses AI. Check for mistakes.
Signed-off-by: Jacob Weinstock <[email protected]>
Description
Move to github.com/tinkerbell/tinkerbell/api: This is the new repo for all API definitions.
Upgrade all go.mod dependencies: This uses the latest version of controller-runtime and capi.
Fix kustomize files to remove deprecated fields: This gets Tilt and kustomize working properly. This was tested using the CAPT playground.
Why is this needed
Fixes: #
How Has This Been Tested?
Tested with the CAPT playground. Everything is successful. I tested with Tinkerbell stack v0.6.2 and the newest version, 0.19.3.
When using the Tinkerbell stack v0.6.2, the CAPT controller logs show some warning log lines. These do not impact operations. This is happening because the new Hardware object has a field (
spec.auto
) that is not a pointer, so it gets included.How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: